<div class="portlet light bordered order-list-container" style="margin: 15px;">
	<div class="portlet-title">
		<div class="caption">
			<span class="caption-subject bold"> Receipt List </span>
		</div>
	
		<div class="actions">
			<button type="button" class="btn blue" ng-click="syncedToHon()"> Synced Receipts to Hon</button> |
			<a ui-sref="wms.inbound.receipt.add" permission-check="{{'inbound::receipt_write'}}">
				<b>Add Receipt</b>
			</a>
		</div>
	</div>
	<div class="portlet-body form form-horizontal">
		<receipt-search-form is-loading="searchLoading" is-exporting="exporting" export-receipt="export(searchParam)" search-receipts="searchReceipts(searchParam)"></receipt-search-form>
		<div ng-show="isLoading" class="text-center">
			<img src="assets/img/loading-spinner-grey.gif">
			<span>&nbsp;LOADING...</span>
		</div>
		<div class="table-scrollable" ng-show="!isLoading">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th ng-repeat="col in colDefs track by $index" class="{{getSortClass($index)}}" ng-click="sortClick($index)">
							{{col.headerName}}
						</th>
						<th ng-if="colDefs" permission-check="{{'inbound::receipt_write'}}">Actions</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in receipts track by $index">
						<td>
							<a ng-href="{{'#/wms/inbound/receipt/' + item.id}}" target="_blank">{{item.id}}</a>
						</td>
						<td>
							<span ng-repeat="entryId in item.entryIds">
								<a ng-href="{{'#/cf/facility/window/checkin/' + entryId + '/' + entryId + '/carrier-info'}}" target="_blank">{{entryId}} &nbsp;{{dockMapByEntry[entryId].dockName?'( '+dockMapByEntry[entryId].dockName+')':''}}</a>&nbsp;</span>
						</td>
						<td>{{item.status}}</td>
						<td>{{item.receiptType}}</td>
						<td>{{item.customerName}}</td>
						<td>{{item.titleName}}</td>
						<td>{{item.carrierName}}</td>
						<td>{{item.containerNo}}</td>
						<td>{{item.bolNo}}</td>
						<td>{{item.referenceNo}}</td>
						<td>{{item.poNo}}</td>
						<td>
							{{item.sealNo}}
						</td>
						<td>
							{{item.snCount}}
						</td>
						<td>{{item.rcSent}}</td>
						<td>{{item.syncStatu ?'Yes':'No'}}</td>
						<td>{{item.expirationDate | amDateFormat:'YYYY-MM-DD HH:mm:ss'}}</td>
						<td>{{item.createdWhen | amDateFormat:'YYYY-MM-DD HH:mm:ss'}}
							<span ng-show="item.createdBy">({{item.createdBy}})</span>
						</td>
						<td>{{item.updatedWhen | amDateFormat:'YYYY-MM-DD HH:mm:ss'}}
							<span ng-show="item.updatedBy">({{item.updatedBy}})</span>
						</td>
						<td>{{item.devannedTime | amDateFormat:'YYYY-MM-DD HH:mm:ss'}}</td>
						<td permission-check="{{'inbound::receipt_write'}}" class="table-btn" >
							
								<waitting-btn  type="button" btn-class="btn" ng-click="singleAsynReceiptToHon(item,$index)"
								value="'Sync To Hon'" is-loading="aysnToHonLoads[$index]"></waitting-btn>
								<button  class="btn red" ng-show="item.status === 'Open'" ng-click="deleteReceipt(item.id)" title="Delete">Delete</button>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<pager total-count="paging.totalCount" current-page ="paging.pageNo" page-size="pageSize" load-content="loadContent(currentPage)"></pager>
	</div>
</div>